#include "StdAfx.h"
#include "AsteroidOrbitParam.h"
#include "ZeroInit.h"

CAsteroidOrbitParam::CAsteroidOrbitParam(double	dVariousParam)
: m_dVariousParam(dVariousParam)
{
}

CAsteroidOrbitParam::~CAsteroidOrbitParam(void)
{
}

double CAsteroidOrbitParam::GetVariousParam() const
{
	return m_dVariousParam;
}

void CAsteroidOrbitParam::SetVariousParam(double dParam)
{
	m_dVariousParam = dParam;
}

const CAsteroidOrbitParam & CAsteroidOrbitParam::operator = (const SBody &body)
{
	m_Body = body;
	COrbitElemTransform::CoordToElem( 0.0, m_Body.x, m_Body.v, m_Elem, COrbitElemTransform::dEclEcvAngle);
	return *this;
}

const CAsteroidOrbitParam & CAsteroidOrbitParam::operator = (const COrbitElemTransform::Elements & Elem)
{
	m_Elem = Elem;
	COrbitElemTransform::ElemToCoord( 0.0, 0.0, 0.0, m_Elem, m_Body.x, m_Body.v);
	m_Body.GM = 0.0;
	return *this;
}

CAsteroidOrbitParam::operator const SBody &() const
{
	return m_Body;
}

CAsteroidOrbitParam::operator const COrbitElemTransform::Elements & () const
{
	return m_Elem;
}

